%
% WJR Longabaugh
% User's manual Latex file
%

\documentstyle{article}
 
\begin{document}

\title{User's Manual\thanks{This ``manual'' only gives the briefest
description for functions in the system.  For more complete treatment, 
consult William J. R. Longabaugh, ``An Expanded System
for Coordinate-Free Geometric Programming'', master's thesis, University
of Washington, 1992.}\ \  for the Expanded Coordinate-Free Geometric
Programming System}
\author {William J.R. Longabaugh}
\maketitle

\section{Lists}

Lists (actually variable-sized arrays) are provided as the primary way
to pass a variable number of objects to and from functions.  Because
the semantics of lists are that they store and return actual copies of
the list elements, instead of using pointers to elements, they are
{\it not} implemented using inheritance from a base class.

\subsection{ScalarList}

\subsubsection*{Constructors}

\noindent \verb$ScalarList(int n)$
\begin{quote}
Builds a list of length $n$, with each entry initialized to 0.0.
\end{quote}

\noindent \verb$ScalarList(Scalar s, int n)$
\begin{quote}
Builds a list of length $n$, with each entry initialized to $s$.
CAUTION: Note that it is very easy to confuse this constructor
with the one that takes two scalars as arguments. 
\end{quote}

\noindent
\begin{verbatim}
ScalarList(Scalar s)
ScalarList(Scalar s1, Scalar s2)
ScalarList(Scalar s1, Scalar s2, Scalar s3)
ScalarList(Scalar s1, Scalar s2, Scalar s3, Scalar s4)
\end{verbatim}
\begin{quote}
Each builds a list and initializes it with the specified values. 
\end{quote}

\subsubsection*{Interrogation and Access}

\noindent \verb$int Length(void)$
\begin{quote}
Returns the length of the list.
\end{quote}

\noindent \verb$Scalar& operator[](int n)$
\begin{quote}
Returns a reference to the $n^{th}$ scalar in the list
(using zero-based indexing).
\end{quote}

\subsubsection*{Concatenation and Duplication}

\noindent \verb$ScalarList operator+(ScalarList& l)$
\begin{quote}
Concatenates the list $l$ on the end of this list and returns
the resulting list.
\end{quote}

\noindent \verb$ScalarList operator*(int i)$
\begin{quote}
Duplicates this list $i$ times, concatenates the copies, and
returns the resulting list.
\end{quote}

\subsubsection*{Miscellaneous}

\noindent
\begin{verbatim}
ScalarList(void)
ScalarList(ScalarList& t)
ScalarList& operator=(ScalarList& t)
~ScalarList()
void debug_out(ostream& c, int indent)
\end{verbatim}
\begin{quote}
Standard housekeeping functions.
\end{quote}

%*********************

\subsection{IntList}

\subsubsection*{Constructors}

\noindent \verb$IntList(int listsize)$
\begin{quote}
Builds a list of length $listsize$, with each entry initialized to 0.
\end{quote}

\noindent \verb$IntList(int element, int listsize)$
\begin{quote}
Builds a list of length $listsize$, with each entry initialized
to $element$.
\end{quote}

\noindent
\begin{verbatim}
IntList(int element1, int element2, int element3)
IntList(int element1, int element2, int element3, int element4)
\end{verbatim}
\begin{quote}
Note that some shortcut constructors cannot be implemented due to
ambiguity with the previously defined constructors.  The given
constructors each builds a list and initializes it with the specified
values.
\end{quote}

\subsubsection*{Interrogation and Access}

\noindent \verb$int Length(void)$
\begin{quote}
Returns the length of the list.
\end{quote}

\noindent \verb$int& operator[](int n)$
\begin{quote}
Returns a reference to the $n^{th}$ integer in the list
(using zero-based indexing).
\end{quote}

\subsubsection*{Concatenation and Duplication}

\noindent \verb$IntList operator+(IntList& l)$
\begin{quote}
Concatenates the list $l$ on the end of this list and returns
the resulting list.
\end{quote}

\noindent \verb$IntList operator*(int i)$
\begin{quote}
Duplicates this list $i$ times, concatenates the copies, and
returns the resulting list.
\end{quote}

\subsubsection*{Miscellaneous}

\noindent
\begin{verbatim}
IntList(void)
IntList(IntList& t)
IntList& operator=(IntList& t)
~IntList()
void debug_out(ostream& c, int indent)
\end{verbatim}
\begin{quote}
Standard housekeeping functions.
\end{quote}

%*********************

\subsection{GeObList}

\subsubsection*{Constructors}

\noindent \verb$GeObList(int n)$
\begin{quote}
Builds a list of length $n$, with each entry initialized to NULL\_GEOB.
\end{quote}

\noindent \verb$GeObList(GeOb& g, int n)$
\begin{quote}
Builds a list of length $n$, with each entry initialized to $g$.
\end{quote}

\noindent
\begin{verbatim}
GeObList(GeOb& m)
GeObList(GeOb& m1, GeOb& m2)
GeObList(GeOb& m1, GeOb& m2, GeOb& m3)
GeObList(GeOb& m1, GeOb& m2, GeOb& m3, GeOb& m4)
\end{verbatim}
\begin{quote}
Each builds a list and initializes it with the specified objects.
\end{quote}

\subsubsection*{Interrogation and Access}

\noindent \verb$int Length(void)$
\begin{quote}
Returns the length of the list.
\end{quote}

\noindent \verb$GeOb& operator[](int n)$
\begin{quote}
Returns the $n^{th}$ GeOb in the list (using zero-based indexing).
\end{quote}

\subsubsection*{Concatenation and Duplication}

\noindent \verb$GeObList operator+(GeObList& g)$
\begin{quote}
Concatenates the list $g$ on the end of this list and returns
the resulting list.
\end{quote}

\noindent \verb$GeObList operator*(int s)$
\begin{quote}
Duplicates this list $s$ times, concatenates the copies, and
returns the resulting list.
\end{quote}

\subsubsection*{Miscellaneous}

\noindent
\begin{verbatim}
GeObList(void)
GeObList(GeObList& t)
GeObList& operator=(GeObList& t)
~GeObList()
void debug_out(ostream& c, int indent)
\end{verbatim}
\begin{quote}
Standard housekeeping functions.
\end{quote}

%*********************

\subsection{SpaceList}
  
\subsubsection*{Constructors}

\noindent \verb$SpaceList(int n)$
\begin{quote}
Builds a list of length $n$, with each entry initialized to NULL\_SPACE.
\end{quote}

\noindent \verb$SpaceList(Space& g, int n)$
\begin{quote}
Builds a list of length $n$, with each entry initialized to $g$.
\end{quote}

\noindent
\begin{verbatim}
SpaceList(Space& m)
SpaceList(Space& m1, Space& m2)
SpaceList(Space& m1, Space& m2, Space& m3)
SpaceList(Space& m1, Space& m2, Space& m3, Space& m4)
\end{verbatim}
\begin{quote}
Each builds a list and initializes it with the specified spaces.
\end{quote}

\subsubsection*{Interrogation and Access}

\noindent \verb$int Length(void)$
\begin{quote}
Returns the length of the list.
\end{quote}

\noindent \verb$Space& operator[](int n)$
\begin{quote}
Returns a reference to the $n^{th}$ space in the list (using
zero-based indexing).
\end{quote}

\subsubsection*{Concatenation and Duplication}

\noindent \verb$SpaceList operator+(SpaceList& g)$
\begin{quote}
Concatenates the list $g$ on the end of this list and returns
the resulting list.
\end{quote}

\noindent \verb$SpaceList operator*(int s)$
\begin{quote}
Duplicates this list $s$ times, concatenates the copies, and
returns the resulting list.
\end{quote}

\subsubsection*{Miscellaneous}

\noindent
\begin{verbatim}
SpaceList(void)
SpaceList(SpaceList& t)
SpaceList& operator=(SpaceList& t)
~SpaceList()
void debug_out(ostream& c, int indent)
\end{verbatim}
\begin{quote}
Standard housekeeping functions.
\end{quote}

%*********************

\subsection{BasisList}

\subsubsection*{Constructors}

\noindent \verb$BasisList(int n)$
\begin{quote}
Builds a list of length $n$, with each entry initialized to NULL\_BASIS.
\end{quote}

\noindent \verb$BasisList(Basis& g, int n)$
\begin{quote}
Builds a list of length $n$, with each entry initialized to $g$.
\end{quote}

\noindent
\begin{verbatim}
BasisList(Basis& m)
BasisList(Basis& m1, Basis& m2)
BasisList(Basis& m1, Basis& m2, Basis& m3)
BasisList(Basis& m1, Basis& m2, Basis& m3, Basis& m4)
\end{verbatim}
\begin{quote}
Each builds a list and initializes it with the specified bases.
\end{quote}

\subsubsection*{Interrogation and Access}

\noindent \verb$int Length(void)$
\begin{quote}
Returns the length of the list.
\end{quote}

\noindent \verb$Basis& operator[](int n)$
\begin{quote}
Returns the $n^{th}$ basis in the list (using zero-based indexing).
\end{quote}

\subsubsection*{Concatenation and Duplication}

\noindent \verb$BasisList operator+(BasisList& g)$
\begin{quote}
Concatenates the list $g$ on the end of this list and returns
the resulting list.
\end{quote}

\noindent \verb$BasisList operator*(int s)$
\begin{quote}
Duplicates this list $s$ times, concatenates the copies, and
returns the resulting list.
\end{quote}

\subsubsection*{Miscellaneous}

\noindent
\begin{verbatim}
BasisList(void)
BasisList(BasisList& t)
BasisList& operator=(BasisList& t)
~BasisList()
void debug_out(ostream& c, int indent)
\end{verbatim}
\begin{quote}
Standard housekeeping functions.
\end{quote}

%*********************

\section{Spaces}

\subsection{Member Functions for the Base Class Space}

\subsubsection*{Interrogation Functions}

\noindent \verb$int Dim(void)$
\begin{quote}
Returns the dimension of the space.
\end{quote}

\noindent \verb$char* Name(char* buf)$
\begin{quote}
Fills in the specified buffer with the debug name of the space, and
returns a pointer to the buffer.
\end{quote}

\noindent \verb$SpaceType Holds(void)$
\begin{quote}
Returns the type of space currently held by the space.
\end{quote}

\noindent \verb$Basis StdBasis(void)$
\begin{quote}
Returns the ``standard basis'' for the space.
\end{quote}

\noindent \verb$SRel SpaceRelation(Space& s)$
\begin{quote}
Returns a tag that says how space $s$ is related to this space.
\end{quote}

\noindent \verb$SRel ThisSpaceIs(void)$
\begin{quote}
Returns a tag that gives the position of this space in the six-space set.
\end{quote}

\noindent \verb$Boolean HasSpace(SRel s)$
\begin{quote}
Returns TRUE if there exists a space in the six-space set that
sits in relation $s$ to this space.  Since spaces are created
lazily, the function returns FALSE if the space has not been
created yet.
\end{quote}

\noindent \verb$Space GetSpace(SRel s)$
\begin{quote}
Returns the space that sits in relation $s$ to this space.
\end{quote}

\noindent \verb$AffineMap AffineMapTo(SRel s)$
\begin{quote}
Returns the affine map to the space that sits in relation $s$ to
this space, if it exists.  Only valid if this space is an affine, 
linearization, or projective completion space.
\end{quote}

\noindent \verb$ProjectiveMap ProjectiveMapTo(SRel s)$
\begin{quote}
Returns the projective map to the space that sits in relation $s$ to
this space, if it exists.  Not valid if this space is not a linearization
or projective completion space.
\end{quote}

\noindent \verb$LinearMap LinearMapTo(SRel s)$
\begin{quote}
Returns the linear map to the space that sits in relation $s$ to
this space, if it exists.  Not valid if this space is not a linearization
or tangent space.
\end{quote}

\noindent \verb$VSpace Dual(void)$
\begin{quote}
Returns the dual space to this space.  Only valid if this space is
a vector space.
\end{quote}

\noindent \verb$Simplex StdSimplex(void)$
\begin{quote}
Returns the ``standard simplex'' for this space.  Only valid if this
space is an affine space.
\end{quote}

\noindent \verb$Boolean IsEuclidean(void)$
\begin{quote}
Returns TRUE if this space is a Euclidean space, FALSE otherwise.
\end{quote}

\noindent \verb$MLM InnerProduct(void)$
\begin{quote}
Returns the inner product for this space.  Only valid if this space
is a Euclidean vector space.
\end{quote}

\noindent \verb$MLM CrossProduct(void)$
\begin{quote}
Returns the cross product for this space.  Only valid if this space
is a Euclidean vector space.
\end{quote}

\noindent \verb$GeObList PtsAtInfinity(void)$
\begin{quote}
Returns a list of points that span the set of points at infinity.
The list will be empty unless this space is a projective space with
a standard affine subset.
\end{quote}

\noindent \verb$SubSet FullSet(void)$
\begin{quote}
Returns a subset that contains all objects in the space.
\end{quote}

\noindent \verb$PSubSet FullProjSet(void)$
\begin{quote}
Returns a projective subset containing all the projective points or
vector equivalence classes in a space.  Not valid for affine spaces.
\end{quote}

\noindent \verb$ASubSet StdAffineSubset(void)$
\begin{quote}
Returns the standard affine subset for a space.
\end{quote}

\noindent \verb$GeObType NativeType(void)$
\begin{quote}
Returns a tag indicating what the native type of object is for a
space (e.g. Vectors for a vector space that is not a tangent space,
AVectors for tangent spaces, PPoints for projective spaces).
\end{quote}

\subsubsection*{Comparison Operators}

\noindent \verb$Boolean operator==(Space& s)$
\begin{quote}
Returns TRUE if and only if the space $s$ is the same as this space.
Two distinct spaces with the same cartesian product structure are
{\it not} considered equal.
\end{quote}

\noindent \verb$Boolean operator!=(Space& s)$
\begin{quote}
Returns TRUE if and only if the space $s$ is not the same as this space.
\end{quote}

\subsubsection*{Cartesian Product Operations}

\noindent \verb$Space operator[](int n)$
\begin{quote}
Returns the $n^{th}$ component space of a cartesian product space.
Indexing is zero-based.
\end{quote}

\noindent \verb$int CPSpaceSize(void)$
\begin{quote}
Returns the number of component spaces in a cartesian product space.
Simple spaces return 1.
\end{quote}

\subsubsection*{Manual Stitching Operations}

\label{space_mso}
\noindent \verb$Space SetSpace(Space& s, Map& m)$
\begin{quote}
Used to manually stitch together spaces into a six-space set.  Space
$s$ is stitched to this space using map $m$, which must be a map from
this space to $s$.
\end{quote}

\subsubsection*{Miscellaneous}

\noindent
\begin{verbatim}
Space(void)
Space(Space& v)
Space& operator=(Space& s)
void debug_out(ostream& c, int indent)
void heavy_debug_out(ostream& c, int indent)
\end{verbatim}
\begin{quote}
Standard housekeeping functions.  The function $debug\_out()$ does not
print out member objects that themselves contain Space member objects
(which avoids infinite recursion).
\end{quote}

%*********************

\subsection{Member Functions for VSpace}

\subsubsection*{Constructors}

\noindent \verb$VSpace(Space& s)$
\begin{quote}
Used to downcast a general space to a vector space.  Only
succeeds if the general space is holding a vector space.
\end{quote}

\noindent \verb$VSpace(char* namein, int n, Boolean eflag)$
\begin{quote}
Builds a vector space of dimension $n$, with debug name in
buffer $namein$.  The space creates its own copy of the 
name.  If the flag $eflag$ is TRUE, the space will be
Euclidean. 
\end{quote}

\noindent \verb$VSpace(char* namein, Boolean eflag, ASpace& a, PSpace& p)$
\begin{quote}
Builds a vector space, linking it to the spaces $a$ and
$p$ to create the core of a six-space set.  The space
creates its own copy of the debug name.  This space is
Euclidean if $eflag$ is TRUE.
\end{quote}

\noindent \verb$VSpace(char* namein, Boolean eflag, Space& ins)$
\begin{quote}
Builds a vector space, linking it to the space $ins$, which is either an
affine or projective space.  The space creates its own copy of the
debug name.  This space is Euclidean if $eflag$ is TRUE.
\end{quote}

\noindent \verb$VSpace(char* namein, SpaceList& t, Boolean eflag)$
\begin{quote}
Builds a cartesian product vector space, using the spaces in the list
$t$ as component spaces.  The space creates its own copy of the
debug name.  If the flag $eflag$ is TRUE, the space will be
Euclidean.
\end{quote}

\subsubsection*{Manual Stitching Operations}

\noindent \verb$Space SetSpace(Space& s, Map& m)$
\begin{quote}
See the description given in Section \ref{space_mso} for the base class
(this is implemented as a virtual function).
\end{quote}

\subsubsection*{Miscellaneous}

\noindent
\begin{verbatim}
VSpace(void)
VSpace(VSpace& v)
VSpace& operator=(VSpace& s)
void debug_out(ostream& c, int indent)
\end{verbatim}
\begin{quote}
Standard housekeeping functions.
\end{quote}

%*********************

\subsection{Member Functions for ASpace}

\subsubsection*{Constructors}

\noindent \verb$ASpace(Space& s)$
\begin{quote}
Used to downcast a general space to an affine space.  Only
succeeds if the general space is holding an affine space.
\end{quote}

\noindent \verb$ASpace(char* namein, int n, Boolean eflag)$
\begin{quote}
Builds an affine space of dimension $n$, with debug name in buffer
$namein$.  The space creates its own copy of the name.  If $eflag$ is
TRUE, the space will be Euclidean.
\end{quote}

\noindent \verb$ASpace(char* namein, Boolean eflag, VSpace& v, PSpace& p)$
\begin{quote}
Builds an affine space, linking it to the spaces $v$ and $p$ to create
the core of a six-space set.  The space creates its own copy of the
debug name.  This space is Euclidean if $eflag$ is TRUE.
\end{quote}

\noindent \verb$ASpace(char* namein, Boolean eflag, Space& ins)$
\begin{quote}
Builds an affine space, linking it to the space $ins$, which is either
a vector or projective space.  The space creates its own copy of the
debug name.  This space is Euclidean if $eflag$ is TRUE.
\end{quote}

\noindent \verb$ASpace(char* namein, SpaceList& t, Boolean eflag)$
\begin{quote}
Builds a cartesian product affine space, using the spaces in the list
$t$ as component spaces.  The space creates its own copy of the
debug name.  If the flag $eflag$ is TRUE, the space will be
Euclidean.
\end{quote}

\subsubsection*{Manual Stitching Operations}

\noindent \verb$Space SetSpace(Space& s, Map& m)$
\begin{quote}
See the description given in Section \ref{space_mso} for the base class
(this is implemented as a virtual function).
\end{quote}

\subsubsection*{Miscellaneous}

\noindent
\begin{verbatim}
ASpace(void)
ASpace(ASpace& s)
ASpace& operator=(ASpace& s)
void debug_out(ostream& c, int indent)
\end{verbatim}
\begin{quote}
Standard housekeeping functions.
\end{quote}

%*********************

\subsection{Member Functions for PSpace}

\subsubsection*{Constructors}

\noindent \verb$PSpace(Space& s)$
\begin{quote}
Used to downcast a general space to an affine space.  Only
succeeds if the general space is holding a projective space.
\end{quote}

\noindent \verb$PSpace(char* namein, int n)$
\begin{quote}
Builds a projective space of dimension $n$, with debug name in
buffer $namein$.  The space creates its own copy of the 
name.
\end{quote}

\noindent \verb$PSpace(char* namein, VSpace& v, ASpace& a)$
\begin{quote}
Builds a projective space, linking it to the spaces $v$ and
$a$ to create the core of a six-space set.  The space
creates its own copy of the debug name.
\end{quote}

\noindent \verb$PSpace(char* namein, Space& v)$
\begin{quote}
Builds a projective space, linking it to the space $v$, which is
either a vector or affine space.  The space creates its own copy
of the debug name.
\end{quote}

\subsubsection*{Manual Stitching Operations}

\noindent \verb$Space SetSpace(Space& s, Map& m)$
\begin{quote}
See the description given in Section \ref{space_mso} for the base class
(this is implemented as a virtual function).
\end{quote}

\subsubsection*{Miscellaneous}

\noindent
\begin{verbatim}
PSpace(void)
PSpace(PSpace& v)
PSpace& operator=(PSpace& s)
void debug_out(ostream& c, int indent)
\end{verbatim}
\begin{quote}
Standard housekeeping functions.
\end{quote}

%*********************

\section{SubSet}

\subsection{Member Functions for the Base Class SubSet}

\subsubsection*{Interrogation Functions}

\noindent \verb$char* Name(char* buf)$
\begin{quote}
Fills in the specified buffer with the debug name of the subset, and
returns a pointer to the buffer.
\end{quote}

\noindent \verb$int Dim(void)$
\begin{quote}
Returns the dimension of the subset. If the subset is projective with
removed points, this dimension reflects the dimension of the related
primitive geometric form (e.g. a projective plane with a removed point
has a dimension of one).
\end{quote}

\noindent \verb$SubSetType Holds(void)$
\begin{quote}
Returns the type of subset currently held by the subset.
\end{quote}

\noindent \verb$Boolean IsIn(GeOb& g)$
\begin{quote}
Returns TRUE if and only if the geometric object $g$ is in the subset.
\end{quote}

\noindent \verb$Space EmbeddingSpace(void)$
\begin{quote}
Returns the space that contains the subset.
\end{quote}

\noindent \verb$Boolean IsSubset(SubSet& s)$
\begin{quote}
Returns TRUE if and only if the subset $s$ is a subset of this subset.
Not valid for projective subsets with removed points.  Will return 
FALSE if the subset types do not match.
\end{quote}

\noindent \verb$Boolean IsFullSpace(void)$
\begin{quote}
Returns TRUE if and only if this subset contains all the geometric objects
in the embedding space.
\end{quote}

\noindent \verb$Boolean HasRemovedPoints(void)$
\begin{quote}
Only valid if the subset is a projective subset.  Returns TRUE
if and only if the subset has a set of removed points (i.e. it is the domain
of a noninvertible projective map).
\end{quote}

\noindent \verb$GeObList AtInfinity(void)$
\begin{quote}
Returns a list of points that span the set of points at infinity.  Only
valid if the subset is an affine subset in a projective space.
\end{quote}

\noindent \verb$VSubSet TangentSub(void)$
\begin{quote}
Returns the subset of associated tangent vectors.  Only valid if the
subset is an affine subset in an affine or vector space.
\end{quote}

\noindent \verb$GeObType Accepts(void)$
\begin{quote}
Returns the type of geometric object that is contained in the subset
(e.g. affine vector equivalence classes in a projective subset defined
in a tangent space).
\end{quote}

\subsubsection*{Miscellaneous}

\noindent
\begin{verbatim}
SubSet(void)
SubSet(SubSet& s)
SubSet& operator=(SubSet& s)
void debug_out(ostream& c, int indent)
\end{verbatim}
\begin{quote}
Standard housekeeping functions.
\end{quote}

%*********************

\subsection{Member Functions for VSubSet}

\subsubsection*{Constructors}

\noindent \verb$VSubSet(char* namein, VSpace& s, GeObList& v)$
\begin{quote}
Builds a vector subset of vector space $s$, with debug name in buffer
$namein$.  The subset creates its own copy of the name.  The geometric
objects in list $v$, after mapping into space $s$ if necessary, span
the subset.
\end{quote}

\noindent \verb$VSubSet(SubSet& s)$
\begin{quote}
Used to downcast a general subset to a vector subset.  Only succeeds
if the general subset is holding a vector subset.
\end{quote}

\subsubsection*{Miscellaneous}

\noindent
\begin{verbatim}
VSubSet(void)
VSubSet(VSubSet& s)
VSubSet& operator=(VSubSet& s)
void debug_out(ostream& c, int indent)
\end{verbatim}
\begin{quote}
Standard housekeeping functions.
\end{quote}

%*********************

\subsection{Member Functions for ASubSet}

\subsubsection*{Constructors}

\noindent \verb$ASubSet(char* namein, Space& s, GeObList& v)$
\begin{quote}
Builds an affine subset of vector or affine space $s$, with debug name
in buffer $namein$.  The subset creates its own copy of the name.  The
geometric objects in list $v$, after mapping into space $s$ if
necessary, span the subset.
\end{quote}

\noindent \verb$ASubSet(char* namein, PSpace& s, GeOb& v, GeObList& inf)$
\begin{quote}
Builds an affine subset of projective space $s$, with debug name in
buffer $namein$.  The subset creates its own copy of the name.  The
geometric objects $v$ and in list $inf$, after mapping into space $s$
if necessary, define a projective subspace.  The subsequent subtraction of
the points at infinity specified by list $inf$ creates an affine
subset.
\end{quote}

\noindent \verb$ASubSet(SubSet& s)$
\begin{quote}
Used to downcast a general subset to an affine subset.  Only succeeds
if the general subset is holding an affine subset.
\end{quote}

\subsubsection*{Miscellaneous}

\noindent
\begin{verbatim}
ASubSet(void)
ASubSet(ASubSet& s)
ASubSet& operator=(ASubSet& s)
void debug_out(ostream& c, int indent)
\end{verbatim}
\begin{quote}
Standard housekeeping functions.
\end{quote}

%*********************

\subsection{Member Functions for PSubSet}

\subsubsection*{Constructors}

\noindent \verb$PSubSet(char* namein, Space& s, GeObList& v)$
\begin{quote}
Builds a projective subset of space $s$, with debug name in buffer
$namein$.  The subset creates its own copy of the name.  The geometric
objects in list $v$, after mapping into space $s$ if necessary, span
the subset.
\end{quote}

\noindent \verb$PSubSet(char* namein, Space& s, GeObList& bp, GeObList& v)$
\begin{quote}
Builds a projective subset of space $s$, with debug name in buffer
$namein$.  The subset creates its own copy of the name.  The geometric
objects in lists $bp$ and $v$, after mapping into space $s$ if
necessary, span some projective subspace.  The objects in $bp$ are
base points that span the set of removed points that are extracted
from the subset.  This constructor is used to build domain subsets for
noninvertible projective maps.
\end{quote}

\noindent \verb$PSubSet(SubSet& s)$
\begin{quote}
Used to downcast a general subset to a projective subset.  Only
succeeds if the general subset is holding a projective subset.
\end{quote}

\subsubsection*{Miscellaneous}

\noindent
\begin{verbatim}
PSubSet(void)
PSubSet(PSubSet& s)
PSubSet& operator=(PSubSet& s)
void debug_out(ostream& c, int indent)
\end{verbatim}
\begin{quote}
Standard housekeeping functions.
\end{quote}

%*********************

\section{Basis}

\subsection{Member Functions for the Base Class Basis}

\subsubsection*{Interrogation Functions}

\noindent \verb$Space SpaceOf(void)$
\begin{quote}
Returns the space that contains the basis.
\end{quote}

\noindent \verb$BasisType Holds(void)$
\begin{quote}
Returns the type of basis currently held by the basis.
\end{quote}

\noindent \verb$char* Name(char* buf)$
\begin{quote}
Fills in the specified buffer with the debug name of the basis, and
returns a pointer to the buffer.
\end{quote}

\noindent \verb$GeOb operator[](int n)$
\begin{quote}
Returns the $n^{th}$ object from the basis, using zero-based indexing.
For $k$-dimensional frames, the point is the $k^{th}$ object. 
\end{quote}

\noindent \verb$ScalarList operator()(GeOb& v)$
\begin{quote}
Returns the coordinates of the object $v$ with respect to this basis.
The object is first mapped into the space of the basis, if necessary. 
\end{quote}

\noindent \verb$VBasis Dual(void)$
\begin{quote}
Returns the vector basis that is the dual of this basis.  Only valid
for vector bases.
\end{quote}


\subsubsection*{Miscellaneous}

\noindent
\begin{verbatim}
Basis(void)
Basis(Basis& b)
Basis& operator=(Basis& b)
void debug_out(ostream& c, int indent)
\end{verbatim}
\begin{quote}
Standard housekeeping functions.
\end{quote}

%*********************

\subsection{Member Functions for Simplex}

\subsubsection*{Constructors}

\noindent \verb$Simplex(char* namein, GeOb& t)$
\begin{quote}
If $t$ is a point tuple from a cartesian product affine space $A
\times \ldots \times A$, this builds a simplex for $A$ from the tuple
members.  The simplex creates its own copy of the debug name given in the
buffer $namein$.
\end{quote}

\noindent \verb$Simplex(char* namein, ASpace& ins, GeObList& t)$
\begin{quote}
Builds a simplex for the affine space $ins$, using the objects in the
list $t$, after they are mapped into $ins$ if necessary.  The simplex
creates its own copy of the debug name given in the buffer $namein$.
\end{quote}

\noindent \verb$Simplex(Basis& f)$
\begin{quote}
Used to downcast a general basis to a simplex.  Only succeeds if the
general basis is holding either a simplex or a frame; the latter can
be automatically cast to a simplex.
\end{quote}


\subsubsection*{Miscellaneous}

\noindent
\begin{verbatim}
Simplex(void)
Simplex(Simplex& b)
Simplex& operator=(Simplex& b)
void debug_out(ostream& c, int indent)
\end{verbatim}
\begin{quote}
Standard housekeeping functions.
\end{quote}

%*********************

\subsection{Member Functions for Frame}

\subsubsection*{Constructors}

\noindent \verb$Frame(Basis& f)$
\begin{quote}
Used to downcast a general basis to a frame.  Only succeeds if the
general basis is holding a frame.
\end{quote}

\noindent \verb$Frame(char* namein, ASpace& ins, GeObList& t)$
\begin{quote}
Builds a frame for the affine space $ins$, using the objects in the
list $t$, after they are mapped into $ins$ (or its tangent space) if
necessary.  The frame creates its own copy of the debug name given in
the buffer $namein$.  The last object in the list $t$ is the point
member of the frame.
\end{quote}

\noindent \verb$Frame(Simplex& b, int n)$
\begin{quote}
Builds a frame from the simplex $b$.  The $n^{th}$ point in the
simplex becomes the point member of the frame.
\end{quote}

\subsubsection*{Miscellaneous}

\noindent
\begin{verbatim}
Frame(void)
Frame(Frame& f)
Frame& operator=(Frame& f)
void debug_out(ostream& c, int indent)
\end{verbatim}
\begin{quote}
Standard housekeeping functions.
\end{quote}

%*********************

\subsection{Member Functions for VBasis}

\subsubsection*{Constructors}

\noindent \verb$VBasis(char* namein, GeOb& t)$
\begin{quote}
If $t$ is a vector tuple from a cartesian product vector space, this
builds a vector basis from the tuple members.  The tuple can be a
mixture of vectors from a linearization space and affine vectors from
a tangent space; the tuple elements are mapped into the appropriate
space as needed.  The basis creates its own copy of the debug name
given in the buffer $namein$.
\end{quote}

\noindent \verb$VBasis(char* name, VSpace& ins, GeObList& t)$
\begin{quote}
Builds a vector basis for the vector space $ins$, using the objects in
the list $t$, after they are mapped into $ins$ if necessary.  The
basis creates its own copy of the debug name given in the buffer
$namein$.
\end{quote}

\noindent \verb$VBasis(Basis& f)$
\begin{quote}
Used to downcast a general basis to a vector basis.  Only succeeds if
the general basis is holding a vector basis.
\end{quote}


\subsubsection*{Miscellaneous}

\noindent
\begin{verbatim}
VBasis(void)
VBasis(VBasis& v)
VBasis& operator=(VBasis& b)
void debug_out(ostream& c, int indent)
\end{verbatim}
\begin{quote}
Standard housekeeping functions.
\end{quote}

%*********************

\subsection{Member Functions for HFrame}

\subsubsection*{Constructors}

\noindent \verb$HFrame(char* namein, PSpace& ins, GeObList& t)$
\begin{quote}
Builds a projective frame for the projective space $ins$, using the
objects in the list $t$, after they are mapped into $ins$ if
necessary.  The projective frame creates its own copy of the debug
name given in the buffer $namein$.
\end{quote}

\noindent \verb$HFrame(Basis& f)$
\begin{quote}
Used to downcast a general basis to a projective frame.  Only succeeds
if the general basis is holding a projective frame.
\end{quote}

\subsubsection*{Miscellaneous}

\noindent
\begin{verbatim}
HFrame(void)
HFrame(HFrame& h)
HFrame& operator=(HFrame& h)
void debug_out(ostream& c, int indent)
\end{verbatim}
\begin{quote}
Standard housekeeping functions.
\end{quote}

%*********************

\section{GeOb}

\subsection{Member Functions for the Base Class GeOb}

\subsubsection*{Typecasting (Including Single-Argument Constructors)}

\label{geob_sac}
\noindent \verb$GeOb(MultiMap& mp)$
\begin{quote}
If the multimap $mp$ has zero arguments, it is cast into a geometric
object in its range space.  If it is instead a one-argument linear map
into the space ``Reals'', it is cast into a vector (or affine vector)
in the dual space of the domain.
\end{quote}

\noindent \verb$GeOb(Map& mp)$
\begin{quote}
If the domain subset of the map $mp$ is a full subset of a vector
space, and the range is the space ``Reals'', the map is cast into a
vector (or affine vector) in the dual space of the domain.
\end{quote}

\noindent \verb$GeOb(Scalar v)$
\begin{quote}
The scalar $v$ is automatically cast into a vector in the predefined
space ``Reals'', using the standard basis ``1''.
\end{quote}

\noindent \verb$Scalar ToScalar(void)$
\begin{quote}
If this GeOb is a vector in the space ``Reals'', it is cast into a
scalar, using the standard basis ``1''.  This casting must be done
explicitly (this avoids compilation ambiguity difficulties).
\end{quote}

\subsubsection*{Interrogation Functions}

\noindent \verb$Space SpaceOf(void)$
\begin{quote}
Returns the space containing the geometric object.
\end{quote}

\noindent \verb$GeObType Holds(void)$
\begin{quote}
Returns the type of geometric object currently held by the GeOb.
\end{quote}

\label{can_map}
\noindent \verb$Boolean CanMapTo(GeObType t)$
\begin{quote}
Returns TRUE if and only if the geometric object can be successfully
mapped into an object of type $t$, using the standard mappings.
\end{quote}

\noindent \verb$Boolean IsZeroVector(void)$
\begin{quote}
Returns TRUE if and only if the object is a zero vector.
\end{quote}

\noindent \verb$GeOb operator[](int n)$
\begin{quote}
Returns the $n^{th}$ element of a vector or point tuple in a
cartesian product space, using zero-based indexing.  If this GeOb is
not a vector, affine vector, or affine point, it is first mapped to a
vector.
\end{quote}

\noindent \verb$GeObList TupleElements(void)$
\begin{quote}
Returns a list of all the elements of a vector or point tuple in a
cartesian product space.  If this GeOb is not a vector, affine vector,
or affine point, it is first mapped to a vector.
\end{quote}


\subsubsection*{Operations}

Algebraic operations are implemented as friends due to the binary
nature of the operators.  Note that these operators will work with
vector (and affine vector) equivalence class arguments.  This is
included for completeness; the randomization that occurs in mappings
from vector (and affine vector) equivalence classes makes it unlikely
that this feature will be useful.
\medskip

\noindent \verb$friend GeOb operator-(GeOb& th)$
\begin{quote}
If the object is a vector or affine vector, this negates it.
Otherwise, it is mapped into a vector in the linearization space (or
into a tangent space vector, if it is an affine vector equivalence
class) prior to negation.
\end{quote}

\noindent
\begin{verbatim}
friend GeOb operator+(GeOb& th, GeOb& g)
friend GeOb operator-(GeOb& th, GeOb& g)
\end{verbatim}
\begin{quote}
If the objects are vectors or affine vectors in the same space, these
operators add or subtract them.  Otherwise, the objects are first
mapped into vectors in the linearization space (or into tangent space
vectors, if the operation involves just affine vector equivalence
classes and/or affine vectors).
\end{quote}

\noindent \verb$friend GeOb operator*(GeOb& th, GeOb& g)$
\begin{quote}
This operation of scalar multiplication is only legal if one of the
geometric objects is a vector in the space ``Reals''.  If the other
object is not a vector or affine vector, it is first mapped into a
vector in the linearization space (or into a tangent space vector, if
it is an affine vector equivalence class) before the scalar
multiplication is carried out.
\end{quote}

\noindent \verb$friend GeOb operator/(GeOb& th, GeOb& g)$
\begin{quote}
Just like the scalar multiplication operation described above, except
that the second operand $g$ is required to be a nonzero vector
in the space ``Reals''.
\end{quote}

\noindent \verb$Scalar Apply(GeOb& a)$
\begin{quote}
Treat this GeOb as a linear functional and apply it to the object $a$
in its dual space.  One of the objects must be in either the
linearization dual space or tangent dual space (if that object is a
vector equivalence class, it is mapped to a vector in the space).  The
other object is first mapped, if necessary, to a vector or affine
vector in the corresponding primal space.
\end{quote}

\noindent \verb$GeOb Dual(void)$
\begin{quote}
If this GeOb is a vector or affine vector, return the dual vector.
Otherwise, it is mapped into a vector in the linearization space (or
into a tangent space vector, if it is an affine vector equivalence
class) prior to taking the dual.  Only valid if the space is
Euclidean.
\end{quote}

\label{map_to}
\noindent \verb$GeOb MapTo(GeObType t)$
\begin{quote}
Apply the standard mappings to this GeOb to convert it to a GeOb of
type $t$, if possible.
\end{quote}

\noindent \verb$GeOb SetTupleElement(int n, GeOb& g)$
\begin{quote}
If this GeOb is not a vector, affine vector, or affine point, it is
first mapped to a vector.  This function returns a tuple that has the
$n^{th}$ element of this tuple changed to $g$, using zero-based
indexing.  The object $g$ is first mapped into the corresponding space
component of the cartesian product space, if necessary.
\end{quote}

\noindent \verb$friend PPoint CrossRatio(AugScalar v, GeObList& g)$
\begin{quote}
The list $g$ must consist of three objects that can be cast into
collinear points in the projective completion space.  Given the list
of points \linebreak $(A, B, C)$, and the cross ratio $v = (A,B;C,D)$,
this routine returns the projective point $D$.
\end{quote}

\noindent \verb$friend AugScalar CrossRatioCalc(GeObList& g)$
\begin{quote}
The list $g$ must consist of four objects that can be cast into
collinear points in the projective completion space, where at least
three are distinct.  Given the list of points $(A, B, C, D)$, this
function returns the cross ratio $(A,B;C,D)$.
\end{quote}

\subsubsection*{Miscellaneous}

\noindent
\begin{verbatim}
GeOb(void)
GeOb(GeOb& g)
GeOb& operator=(GeOb& g)
void debug_out(ostream& c, int indent)
\end{verbatim}
\begin{quote}
Standard housekeeping functions.
\end{quote}

%*********************

\subsection{Member Functions for Vector}

\subsubsection*{Constructors}

\noindent \verb$Vector(VBasis& b, ScalarList& a)$
\begin{quote}
This creates a vector in the space containing the basis $b$
with the coordinates given in the list of scalars.
\end{quote}

\noindent
\begin{verbatim}
Vector(VSpace& ins, GeObList& s)
Vector(VSpace& ins, GeOb& v1, GeOb& v2)
Vector(VSpace& ins, GeOb& v1, GeOb& v2, GeOb& v3)
\end{verbatim}
\begin{quote}
These constructors build a vector tuple in the specified cartesian
product vector space $ins$.  The elements of the tuple are either given
by the objects in the list $s$ (for the first constructor), or
individually (the other two constructors).  The elements are first
cast into vectors or affine vectors, if necessary.
\end{quote}

\subsubsection*{Typecasting (Including Single-Argument Constructors)}

\noindent \verb$Vector(GeOb& a)$
\begin{quote}
Used to downcast an arbitrary geometric object to a vector.  Standard
maps will be used to map the GeOb to a vector; this will succeed if
the mapping succeeds.
\end{quote}

\noindent
\begin{verbatim}
Vector(MultiMap& m)
Vector(Map& m)
Vector(Scalar s)
\end{verbatim}
\begin{quote}
See the descriptions given in Section \ref{geob_sac} for the GeOb
\linebreak single-argument constructors.
\end{quote}

\subsubsection*{Mapping}

\noindent
\begin{verbatim}
Boolean CanMapTo(GeObType t)
GeOb MapTo(GeObType t)
\end{verbatim}
\begin{quote}
See the description given in Section \ref{can_map} for the base class
(these are implemented as virtual functions).
\end{quote}

\subsubsection*{Miscellaneous}

\noindent
\begin{verbatim}
Vector(void)
Vector(Vector& v)
Vector& operator=(Vector& s)
void debug_out(ostream& c, int indent)
\end{verbatim}
\begin{quote}
Standard housekeeping functions.
\end{quote}

%*********************

\subsection{Member Functions for AVector}

\subsubsection*{Constructors}

\noindent \verb$AVector(Basis& b, ScalarList& a)$
\begin{quote}
This creates an affine vector specified by the coordinates $a$ with
respect to the basis $b$.  The basis can either be a vector basis
for the tangent space, or a simplex or frame for the associated affine
space.
\end{quote}

\noindent
\begin{verbatim}
AVector(VSpace& ins, GeObList& s)
AVector(VSpace& ins, GeOb& v1, GeOb& v2)
AVector(VSpace& ins, GeOb& v1, GeOb& v2, GeOb& v3)
\end{verbatim}
\begin{quote}
These constructors build an affine vector tuple in the specified
cartesian product vector space $ins$.  The elements of the tuple are
either given by the objects in the list $s$ (for the first
constructor), or individually (the other two constructors).  The
elements are first cast into affine vectors, if necessary.
\end{quote}

\subsubsection*{Typecasting (Including Single-Argument Constructors)}

\noindent \verb$AVector(GeOb& a)$
\begin{quote}
Used to convert an arbitrary geometric object to an affine vector.
Standard maps will be used to map the GeOb to an affine vector; this
will succeed if the mapping succeeds.
\end{quote}

\noindent
\begin{verbatim}
AVector(MultiMap& m)
AVector(Map& m)
\end{verbatim}
\begin{quote}
See the descriptions given in Section \ref{geob_sac} for the GeOb
\linebreak single-argument constructors.
\end{quote}

\subsubsection*{Mapping}

\noindent
\begin{verbatim}
Boolean CanMapTo(GeObType t)
GeOb MapTo(GeObType t)
\end{verbatim}
\begin{quote}
See the description given in Section \ref{can_map} for the base class
(these are implemented as virtual functions).
\end{quote}

\subsubsection*{Miscellaneous}

\noindent
\begin{verbatim}
AVector(void)
AVector(AVector& v)
AVector& operator=(AVector& g)
void debug_out(ostream& c, int indent)
\end{verbatim}
\begin{quote}
Standard housekeeping functions.
\end{quote}

%*********************

\subsection{Member Functions for VectorEC}

\subsubsection*{Typecasting (Including Single-Argument Constructors)}

\noindent \verb$VectorEC(GeOb& a)$
\begin{quote}
Used to convert an arbitrary geometric object to a vector equivalence
class.  Standard maps will be used to map the GeOb to a vector
equivalence class; this will succeed if the mapping succeeds.
\end{quote}

\noindent
\begin{verbatim}
VectorEC(MultiMap& m)
VectorEC(Map& m)
\end{verbatim}
\begin{quote}
See the descriptions given in Section \ref{geob_sac} for the GeOb
\linebreak single-argument constructors.  If $m$ can be cast into a
vector, these constructors will then attempt to convert it to a vector
equivalence class.
\end{quote}

\subsubsection*{Mapping}

\noindent
\begin{verbatim}
Boolean CanMapTo(GeObType t)
GeOb MapTo(GeObType t)
\end{verbatim}
\begin{quote}
See the description given in Section \ref{can_map} for the base class
(these are implemented as virtual functions).
\end{quote}

\subsubsection*{Miscellaneous}

\noindent
\begin{verbatim}
VectorEC(void)
VectorEC(VectorEC& v)
VectorEC& operator=(VectorEC& g)
void debug_out(ostream& c, int indent)
\end{verbatim}
\begin{quote}
Standard housekeeping functions.
\end{quote}

%*********************

\subsection{Member Functions for AVectorEC}

\subsubsection*{Typecasting (Including Single-Argument Constructors)}

\noindent \verb$AVectorEC(GeOb& a)$
\begin{quote}
Used to convert an arbitrary geometric object to an affine vector
equivalence class.  Standard maps will be used to map the GeOb to a
affine vector equivalence class; this will succeed if the mapping
succeeds.
\end{quote}

\noindent
\begin{verbatim}
AVectorEC(MultiMap& m)
AVectorEC(Map& m)
\end{verbatim}
\begin{quote}
See the descriptions given in Section \ref{geob_sac} for the GeOb
\linebreak single-argument constructors.  If $m$ can be cast into an affine
vector, these constructors will then attempt to map it to an affine
vector equivalence class.
\end{quote}

\subsubsection*{Mapping}

\noindent
\begin{verbatim}
Boolean CanMapTo(GeObType t)
GeOb MapTo(GeObType t)
\end{verbatim}
\begin{quote}
See the description given in Section \ref{can_map} for the base class
(these are implemented as virtual functions).
\end{quote}

\subsubsection*{Miscellaneous}

\noindent
\begin{verbatim}
AVectorEC(void)
AVectorEC(AVectorEC& v)
AVectorEC& operator=(AVectorEC& g)
void debug_out(ostream& c, int indent)
\end{verbatim}
\begin{quote}
Standard housekeeping functions.
\end{quote}

%*********************

\subsection{Member Functions for APoint}

\subsubsection*{Constructors}

\noindent \verb$APoint(Basis& s, ScalarList& a)$
\begin{quote}
This creates an affine point specified by the coordinates $a$ with
respect to the basis $s$.  The basis can either be a simplex or a 
frame.
\end{quote}

\noindent
\begin{verbatim}
APoint(ASpace& ins, GeObList& s)
APoint(ASpace& ins, GeOb& p1, GeOb& p2)
APoint(ASpace& ins, GeOb& p1, GeOb& p2, GeOb& p3)
\end{verbatim}
\begin{quote}
These constructors build a point tuple in the specified cartesian
product affine space $ins$.  The elements of the tuple are either
given by the objects in the list $s$ (for the first constructor),
or individually (the other three constructors).  The elements are
first cast into affine points, if necessary.
\end{quote}

\subsubsection*{Typecasting (Including Single-Argument Constructors)}

\noindent \verb$APoint(GeOb& a)$
\begin{quote}
Used to convert an arbitrary geometric object to an affine point.
Standard maps will be used to map the GeOb to an affine point; this
will succeed if the mapping succeeds.
\end{quote}

\noindent
\begin{verbatim}
APoint(MultiMap& m)
APoint(Map& m)
\end{verbatim}
\begin{quote}
See the descriptions given in Section \ref{geob_sac} for the GeOb
\linebreak single-argument constructors.  If $m$ can be cast into some sort of
geometric object, these constructors will then attempt to map it
to an affine point using standard maps.
\end{quote}

\subsubsection*{Mapping}

\noindent
\begin{verbatim}
Boolean CanMapTo(GeObType t)
GeOb MapTo(GeObType t)
\end{verbatim}
\begin{quote}
See the description given in Section \ref{can_map} for the base class
(these are implemented as virtual functions).
\end{quote}

\subsubsection*{Miscellaneous}

\noindent
\begin{verbatim}
APoint(void)
APoint(APoint& p)
APoint& operator=(APoint& g)
void debug_out(ostream& c, int indent)
\end{verbatim}
\begin{quote}
Standard housekeeping functions.
\end{quote}

%*********************

\subsection{Member Functions for PPoint}

\subsubsection*{Constructors}

\noindent \verb$PPoint(HFrame& s, ScalarList& a)$
\begin{quote}
This creates a projective point specified by the homogeneous
coordinates $a$ with respect to the projective frame $s$.
\end{quote}

\subsubsection*{Typecasting (Including Single-Argument Constructors)}

\noindent \verb$PPoint(GeOb& a)$
\begin{quote}
Used to convert an arbitrary geometric object to a projective point.
Standard maps will be used to map the GeOb to a projective point; this
will succeed if the mapping succeeds.
\end{quote}

\noindent
\begin{verbatim}
PPoint(MultiMap& m)
PPoint(Map& m)
\end{verbatim}
\begin{quote}
See the descriptions given in Section \ref{geob_sac} for the GeOb
\linebreak single-argument constructors.  If $m$ can be cast into some sort of
geometric object, these constructors will then attempt to map it
to a projective point using standard maps.
\end{quote}

\subsubsection*{Mapping}

\noindent
\begin{verbatim}
Boolean CanMapTo(GeObType t)
GeOb MapTo(GeObType t)
\end{verbatim}
\begin{quote}
See the description given in Section \ref{can_map} for the base class
(these are implemented as virtual functions).
\end{quote}

\subsubsection*{Miscellaneous}

\noindent
\begin{verbatim}
PPoint(void)
PPoint(PPoint& v)
PPoint& operator=(PPoint& g)
void debug_out(ostream& c, int indent)
\end{verbatim}
\begin{quote}
Standard housekeeping functions.
\end{quote}

%*********************

\section{Map}

\subsection{Member Functions for the Base Class Map}

\subsubsection*{Typecasting (Including Single-Argument Constructors)}

\label{map_sac}
\noindent \verb$Map(MultiMap& m)$
\begin{quote}
If the multimap $m$ has a simple vector or affine space as a
domain (i.e. the domain cartesian product space has only one
component space), this routine will convert it into a simple map.
\end{quote}

\noindent \verb$Map(GeOb& g)$
\begin{quote}
If the argument $g$ is a vector or affine vector (or can be
converted to a vector), the routine converts it to a map from
the dual space of the vector to the reals.
\end{quote}

\subsubsection*{Interrogation Functions}

\noindent \verb$SubSet Range(void)$
\begin{quote}
Returns the subset that is the range of the map.
\end{quote}

\noindent \verb$SubSet Domain(void)$
\begin{quote}
Returns the subset that is the domain of the map.
\end{quote}

\noindent \verb$MapType Holds(void)$
\begin{quote}
Returns the type of map currently held by the map.
\end{quote}

\noindent \verb$Boolean Invertible(void)$
\begin{quote}
Returns TRUE if and only if the map is invertible.
\end{quote}


\subsubsection*{Functions to Apply Maps}

\noindent \verb$GeOb operator()(GeOb& v)$
\begin{quote}
Apply this map to the geometric object $v$ and return the image in
the range.  If the argument is not in the domain space, an attempt is
made to map it using the standard mappings.
\end{quote}


\subsubsection*{Functions that Compose and Invert Maps}

\noindent \verb$Map Inv(void)$
\begin{quote}
Inverts this map.  Only legal if the map is invertible. 
\end{quote}

\noindent \verb$Map Compose(Map& m)$
\begin{quote}
Composes this map with the map $m$ and returns the result.  The range
of map $m$, which is applied first, must be a subset of the domain of
this map.  Only valid if the two maps are the same type (e.g. both
affine).
\end{quote}

\noindent \verb$ProjectiveMap ComposeProj(Map& m)$
\begin{quote}
Compose affine and projective maps to form a projective map.  Any
affine maps are first converted to projective maps using the
following $InducedProjective()$ function.
\end{quote}


\subsubsection*{Functions to Obtain Induced Maps}

\noindent \verb$ProjectiveMap InducedProjective(void)$
\begin{quote}
Only valid if this map is an invertible affine map between full affine
subsets of affine spaces.  This routine returns the corresponding
projective map between the neighboring projective completion spaces.
\end{quote}

\noindent \verb$LinearMap InducedLinear(void)$
\begin{quote}
Only valid if this map is an affine map between full affine subsets of
affine spaces.  This routine returns the corresponding linear map
between the neighboring linearization spaces.
\end{quote}

\noindent \verb$LinearMap Trans(void)$
\begin{quote}
Returns the transpose of this map.  Only valid if this map is
a linear map between full linear subsets of vector spaces.
\end{quote}

\noindent \verb$LinearMap AssocLinear(void)$
\begin{quote}
If this is an affine map from an affine subset of an affine space to
an affine or linear subset of a linear or affine space, this routine
returns the map induced on the tangent space of the domain space.
\end{quote}

\noindent \verb$Vector AssocDualVector(void)$
\begin{quote}
If this map is an affine functional (i.e. an affine map into the 
reals), this function returns the vector in the dual of the
tangent space corresponding to the associated linear map.
\end{quote}

\subsubsection*{Miscellaneous}

\noindent
\begin{verbatim}
Map(void)
Map(Map& m)
Map& operator=(Map& m)
void debug_out(ostream& c, int indent)
\end{verbatim}
\begin{quote}
Standard housekeeping functions.
\end{quote}

%*********************

\subsection{Member Functions for LinearMap}

\subsubsection*{Constructors}

\noindent \verb$LinearMap(VBasis& b1, VBasis& b2)$
\begin{quote}
Builds an invertible linear map between two vector spaces that carries
the vectors in basis $b1$ to the vectors in $b2$.
\end{quote}

\noindent \verb$LinearMap(VBasis& b, SubSet& s, GeObList& v)$
\begin{quote}
More general linear map creation routine.  The domain of the map is a
whole vector space, but the range can be a linear subset of a vector
space.  The objects in the list $v$ are the images of the vectors
in basis $b$; they are first mapped into the space of $s$, if
necessary.  The image objects do not have to be independent or span
the subset $s$.
\end{quote}

\noindent \verb$LinearMap(SubSet& s, GeObList& v, VBasis& b)$
\begin{quote}
Similar to the previous linear map creation routine, except that the
range of the map is a whole vector space, while the domain can be a
linear subset of a vector space.  The objects in the list $v$ are
the preimages of the vectors in basis $b$; they are first mapped
into the space of $s$, if necessary.  In this case, the image
objects in $v$ must be independent and span the subset $s$.
\end{quote}

\noindent \verb$LinearMap(SubSet& s1, GeObList& v1, SubSet& s2, GeObList& v2)$
\begin{quote}
Most general linear map creation routine, where both the range and
domains are linear subsets of a vector space.  The objects in the list
$v1$ map to the objects in list $v2$; standard maps are first applied
to the objects in the lists if necessary.  The image objects in $v1$
must be independent and span the subset $s1$.
\end{quote}

\subsubsection*{Typecasting (Including Single-Argument Constructors)}

\noindent
\begin{verbatim}
LinearMap(MultiMap& m)
LinearMap(GeOb& g)
\end{verbatim}
\begin{quote}
See the descriptions given in Section \ref{map_sac} for the Map
single-argument constructors.
\end{quote}

\noindent \verb$LinearMap(Map& m)$
\begin{quote}
Used to downcast a general map to a linear map.  Only succeeds if
the general map is holding a linear map.
\end{quote}

\subsubsection*{Miscellaneous}

\noindent
\begin{verbatim}
LinearMap(void)
LinearMap(LinearMap& m)
LinearMap& operator=(LinearMap& s)
void debug_out(ostream& c, int indent)
\end{verbatim}
\begin{quote}
Standard housekeeping functions.
\end{quote}

%*********************

\subsection{Member Functions for AffineMap}

\subsubsection*{Constructors}

\noindent \verb$AffineMap(Basis& b1, Basis& b2)$
\begin{quote}
Builds an invertible affine map between two affine spaces that carries
the objects in basis $b1$ to the objects in $b2$.  The bases
can be either both simplices or both frames.
\end{quote}

\noindent \verb$AffineMap(Simplex& b, SubSet& s, GeObList& v)$
\begin{quote}
More general linear map creation routine.  The domain of the map is a
whole affine space, but the range can be either a linear subset of a
vector space or an affine subset.  Note that the basis for the domain
space is restricted to be a simplex.  The objects in the list $v$
are the images of the objects in basis $b$; they are first mapped
into the space of $s$, if necessary.  The image objects do not
have to be independent or span the subset $s$.
\end{quote}

\noindent \verb$AffineMap(SubSet& s, GeObList& v, Simplex& b)$
\begin{quote}
Similar to the previous affine map creation routine, except that the
range of the map is a whole affine space, while the domain can be an
affine subset.  The objects in the list $v$ are the preimages of
the points in simplex $b$; they are first mapped into the space of
$s$, if necessary.  In this case, the image objects in $v$
must be independent and span the subset $s$.
\end{quote}

\noindent \verb$AffineMap(SubSet& s1, GeObList& v1, SubSet& s2, GeObList& v2)$
\begin{quote}
Most general affine map creation routine, where the domain is some
affine subset and the range is either a linear or affine subset.  The
objects in the list $v1$ map to the objects in list $v2$;
standard maps are first applied to the objects in the lists if
necessary.  The image objects in $v1$ must be independent and span
the subset $s1$.
\end{quote}

\subsubsection*{Typecasting (Including Single-Argument Constructors)}

\noindent \verb$AffineMap(MultiMap& m)$
\begin{quote}
If the multimap $m$ has an atomic affine space as a
domain (i.e. the domain cartesian product space has only one
component space), this routine will convert it into a simple 
affine map.
\end{quote}

\noindent \verb$AffineMap(Map& m)$
\begin{quote}
Used to downcast a general map to an affine map.  Only succeeds if
the general map is holding an affine map.
\end{quote}

\subsubsection*{Miscellaneous}

\noindent
\begin{verbatim}
AffineMap(void)
AffineMap(AffineMap& m)
AffineMap& operator=(AffineMap& s)
void debug_out(ostream& c, int indent)
\end{verbatim}
\begin{quote}
Standard housekeeping functions.
\end{quote}

%*********************

\subsection{Member Functions for ProjectiveMap}

\subsubsection*{Constructors}

\noindent \verb$ProjectiveMap(HFrame& b1, HFrame& b2)$
\begin{quote}
Builds an invertible projective map between two projective spaces that
carries the projective points in the projective frame $b1$ to the 
projective points in $b2$.
\end{quote}

\noindent \verb$ProjectiveMap(HFrame& b, SubSet& s, GeObList& v)$
\begin{quote}
More general projective map creation routine, used to build invertible
maps from a whole projective space to a projective subset.  Since the
only allowable method for creating noninvertible maps is to have a
domain subspace with removed points, this routine requires the image
objects $v$ to be independent and span $s$.  Note that $s$ could be a
projective subset of a vector space.  The range subset $s$ must be
projective and cannot have removed points.  The objects in the list
$v$ are the images of the objects in the frame $b$; they are first
mapped into the space of $s$, if necessary.
\end{quote}

\noindent \verb$ProjectiveMap(SubSet& s, GeObList& v, HFrame& b)$
\begin{quote}
This constructor is used to build a projective map from a projective
subset to a projective space.  If the domain subset has removed
points, this map will not be invertible.  The objects in the list $v$
are the preimages of the objects in the frame $b$; they are first
mapped into the space of $s$, if necessary.  The objects in $v$ must
be in general position and span the subset $s$.
\end{quote}

\noindent \verb$ProjectiveMap(SubSet& s1, GeObList& v1, SubSet& s2, GeObList& v2)$
\begin{quote}
Most general projective map creation routine, where the domain and
range are projective subsets.  If the domain subset $s1$ has removed
points, this map will not be invertible.  The range subset $s2$ cannot
have removed points.  The objects in the list $v1$ map to the objects
in list $v2$; standard maps are first applied to the objects in the
lists if necessary.  The objects in both $v1$ and $v2$ must be in
general position and span their respective subsets $s1$ and $s2$.
\end{quote}

\subsubsection*{Typecasting (Including Single-Argument Constructors)}

\noindent \verb$ProjectiveMap(Map& m)$
\begin{quote}
Used to downcast a general map to a projective map.  Only succeeds if
the general map is holding a projective map.
\end{quote}

\subsubsection*{Miscellaneous}

\noindent
\begin{verbatim}
ProjectiveMap(void)
ProjectiveMap(ProjectiveMap& m)
ProjectiveMap& operator=(ProjectiveMap& s)
void debug_out(ostream& c, int indent)
\end{verbatim}
\begin{quote}
Standard housekeeping functions.
\end{quote}

%*********************

\section{MultiMap}

\subsection{Member Functions for the Base Class MultiMap}

\subsubsection*{Typecasting (Including Single-Argument Constructors)}

\label{mul_sac}
\noindent \verb$Scalar ToScalar(void)$
\begin{quote}
If this multimap has zero arguments, and the range space is the space
``Reals'', this routine converts it to a scalar, using the standard
basis of ``1''.  Note that this conversion must be done explicitly.
\end{quote}

\noindent \verb$MultiMap(Map& m)$
\begin{quote}
If the map $m$ is linear, or is an affine map from an affine
space, and if the domain is a full space, this routine casts it
into a multimap.
\end{quote}

\noindent \verb$MultiMap(GeOb& g)$
\begin{quote}
If the argument $g$ is a vector or affine vector (or can be converted
to a vector), this routine casts it to a map from the dual space of
the vector to the space ``Reals'', which is then in turn cast to a
multimap.  Note that there is no support for casting a GeOb into a
zero-argument multimap.
\end{quote}

\subsubsection*{Interrogation Functions}

\noindent \verb$Space RangeSpace(void)$
\begin{quote}
Returns the range space of this multimap.
\end{quote}

\noindent \verb$Space DomainSpace(void)$
\begin{quote}
Returns the domain space of this multimap.
\end{quote}

\noindent \verb$Boolean FullyEvaluated(void)$
\begin{quote}
Returns TRUE if and only if this multimap has been fully evaluated (i.e.
it is a zero-argument map).
\end{quote}

\noindent \verb$MultiType Holds(void)$
\begin{quote}
Returns the type of multimap currently held by this multimap.
\end{quote}

\subsubsection*{Functions to Apply Maps and do Partial Evaluation}

\noindent \verb$GeOb operator()(GeOb& t)$
\begin{quote}
Apply the multimap to the argument $t$, which is a tuple from
the cartesian product domain space, and return the image in the
range space.
\end{quote}

\noindent \verb$MultiMap operator()(GeObList& t)$
\begin{quote}
Apply the multimap to the list of arguments $t$ where the $n^{th}$
element of the list is a member of the $n^{th}$ component space of the
cartesian product domain space; standard maps are first applied to the
arguments as needed.  A list element that is a NULL\_GEOB causes the
routine to skip evaluation of the corresponding argument, permitting
partial evaluation of the map.  The routine returns the new multimap
that results from this evaluation.  This routine is not typically
recommended for doing partial evaluation, as the system must create a
new space to serve as the domain of the partially evaluated map (see
the next function).
\end{quote}

\noindent \verb$MultiMap operator()(Space& newdom, GeObList& t)$
\begin{quote}
Like the above routine, but saves the system from having to create a
new space.  The space $newdom$ is used as the domain for the partially
evaluated multimap that is returned.
\end{quote}

\subsubsection*{Miscellaneous}

\noindent
\begin{verbatim}
MultiMap(void)
MultiMap(MultiMap& v)
MultiMap& operator=(MultiMap& s)
void debug_out(ostream& c, int indent)
\end{verbatim}
\begin{quote}
Standard housekeeping functions.
\end{quote}

%*********************

\subsection{Member Functions for MLM}

\subsubsection*{Constructors}

\noindent 
\begin{verbatim}
MLM(VSpace& s1, IntList& symmetry, BasisList& bases,
    VSpace& s2, GeObList& vectors)
\end{verbatim}
\begin{quote}
Creates a multilinear map from the cartesian product domain space $s1$
to the range space $s2$.  The list of integers $symmetry$ specifies
the symmetry characteristics of the map.  The basis list $bases$
specifies one basis for each symmetry group in the domain, while the
list $vectors$ give the images in the range.  See the thesis writeup
for more detailed information and examples.
\end{quote}

\subsubsection*{Typecasting (Including Single-Argument Constructors)}

\noindent \verb$MLM(MultiMap& s)$
\begin{quote}
Used to downcast a general multimap to a multilinear map.  Only
succeeds if the general multimap is holding a multilinear map.
\end{quote}

\noindent
\begin{verbatim}
MLM(Map& m)
MLM(GeOb& g)
\end{verbatim}
\begin{quote}
See the descriptions given in Section \ref{mul_sac} for the MultiMap
single-\linebreak argument constructors.
\end{quote}

\subsubsection*{Miscellaneous}

\noindent
\begin{verbatim}
MLM(void)
MLM(MLM& m)
MLM& operator=(MLM& s)
void debug_out(ostream& c, int indent)
\end{verbatim}
\begin{quote}
Standard housekeeping functions.
\end{quote}

%*********************

\subsection{Member Functions for MAM}

\subsubsection*{Constructors}

\noindent 
\begin{verbatim}
MAM(ASpace& s1, IntList& symmetry, BasisList& simplices,
    Space& s2, GeObList& images)
\end{verbatim}
\begin{quote}
Creates a multiaffine map from the cartesian product domain space $s1$
to the range space $s2$.  The list of integers $symmetry$ specifies
the symmetry characteristics of the map.  The simplex list $simplices$
specifies one simplex for each symmetry group in the domain, while the
list $images$ give the images in the range.  See the thesis writeup
for more detailed information and examples.
\end{quote}

\subsubsection*{Typecasting (Including Single-Argument Constructors)}

\noindent \verb$MAM(MultiMap& s)$
\begin{quote}
Used to downcast a general multimap to a multiaffine map.  Only
succeeds if the general multimap is holding a multiaffine map.
\end{quote}

\noindent \verb$MAM(Map& m)$
\begin{quote}
See the description given in Section \ref{mul_sac} for the MultiMap
single-\linebreak argument constructors.
\end{quote}

\subsubsection*{Miscellaneous}

\noindent
\begin{verbatim}
MAM(void)
MAM(MAM& m)
MAM& operator=(MAM& s)
void debug_out(ostream& c, int indent)
\end{verbatim}
\begin{quote}
Standard housekeeping functions.
\end{quote}

%*********************

\section{AugScalar}

\subsection{Member Functions for the Base Class AugScalar}

\subsubsection*{Constructors}

\noindent \verb$AugScalar(Infnum n)$
\begin{quote}
Creates an augmented scalar with the value infinity when the argument
$n$ is equal to ``INFINITY''.  CAUTION: INFINITY is implemented as an
enumerated data type with the arbitrary integer value -23457.
\end{quote}

\subsubsection*{Typecasting (Including Single-Argument Constructors)}

\noindent \verb$AugScalar(Scalar v)$
\begin{quote}
Creates an augmented scalar of value $v$.
\end{quote}

\noindent \verb$operator Scalar()$
\begin{quote}
Used for casting augmented scalars to scalars automatically. 
\end{quote}

\subsubsection*{Interrogation Functions}

\noindent \verb$Scalar Value(void)$
\begin{quote}
Return the value of the augmented scalar.  Only valid if it is
not equal to infinity. 
\end{quote}

\noindent \verb$Boolean IsInfinity(void)$
\begin{quote}
Returns TRUE if and only if the augmented scalar has the value INFINITY.
\end{quote}


\subsubsection*{Miscellaneous}

\noindent
\begin{verbatim}
AugScalar(void)
AugScalar(AugScalar& a)
AugScalar& operator=(AugScalar& a)
void debug_out(ostream& c, int indent)
\end{verbatim}
\begin{quote}
Standard housekeeping functions.
\end{quote}

%*********************


\section{Miscellaneous}

\subsection{Object and ErrorHandler Classes}

To facilitate error reporting, every class in this package (except the
error handler) is a subclass of the Object class.  Every object knows
how to print itself out, using the virtual function
\begin{quote}
\begin{verbatim}
void debug_out(ostream& c, int indent)
\end{verbatim}
\end{quote}
which prints out the contents of the object on output stream $c$.  The
printout is indented $indent$ characters.  The stream output operator
``{\tt <<}'' is also defined for objects.

The error handler (there is a single predefined instance of the error
handler class, ``errh'', provided with the system) is used to print
out error messages and terminate the program.  Member functions for
the handler are of the form
\begin{quote}
\begin{verbatim}
void ErrorExit(char* errloc, char* descript, Object& o1)
\end{verbatim}
\end{quote}
where $errloc$ contains the function signature for where the
error occurred, $descript$ gives a description for the error,
and $o1$ is an object that will have its contents printed out.
Member functions accepting from zero to five objects are provided.
A special class ErrVal is also provided, which allows 
scalar and integer values to be passed to the error handler as
Objects.  ErrVal constructors are
\begin{quote}
\begin{verbatim}
ErrVal(char* message, Scalar val)
ErrVal(char* message, int val)
\end{verbatim}
\end{quote}
which permit values to be tagged with an explanatory message.  There
is also a special class ErrType, which allows a value of an enumerated
types described in Section \ref{enum_types} to be passed to the
error handler as well.  To construct an ErrType, the user specifies
a message, the value of the enumerated type, and a key to what the
enumerated type is:
\begin{quote}
\begin{verbatim}
ErrVal(char* message, int val, EnumSet s)
\end{verbatim}
\end{quote}

\subsection{Matrix and RowMatrix Classes}

The geometry package is built on top of a matrix package that
implements the Matrix and RowMatrix classes; a matrix is
built up of row matrices.  Since it is not intended for the
user to be using this underlying support layer, a detailed
description of the package will not be provided.

\subsection{Booleans and Scalars}

Booleans are implemented in this package as an enumerated data
type that takes on the values TRUE and FALSE.  Scalars
are implemented as doubles.

\subsection{Enumerated Types}
\label{enum_types}
Several enumerated data types are defined in the system.  These types
are:
\begin{description}
\item[SRel:] LINEARIZATION, AFFINE, TANGENT, PROJECT\_COMP, \linebreak 
             LIN\_DUAL, TANG\_DUAL, NO\_RELATION, SAME\_SPACE
\item[SpaceType:] NULL\_SPACE, VEC\_SPACE, AFF\_SPACE, 
		 PROJ\_SPACE, \linebreak ANY\_SPACE
\item[BasisType:] NULL\_BASIS, SIMPLEX, FRAME, VBASIS,
		  HFRAME, \linebreak ANY\_BASIS
\item[GeObType:] NULL\_GEOB, VECTOR, AFF\_POINT, AFF\_VECTOR,
                 \linebreak VEC\_EC, AFF\_VEC\_EC, PROJ\_POINT, ANY\_GEOB
\item[MapType:] NULL\_MAP, LIN\_MAP, AFF\_MAP, PROJ\_MAP, ANY\_MAP
\item[MultiType:] NULL\_MULTI, MULTI\_LINEAR, MULTI\_AFFINE, \linebreak 
		ANY\_MULTI
\item[SubSetType:] NULL\_SUBSET, LINEAR\_SUBSET, AFFINE\_SUBSET,
		   PROJECTIVE\_SUBSET, ANY\_SUBSET
\item[EnumSet:] SPACETYPES, BASISTYPES, GEOBTYPES, MAPTYPES, \linebreak
		MULTITYPES, SUBSETTYPES, SRELTYPES
\end{description}
Probably the most important type for the user to be familiar with is
the SRel type, which is used to navigate around the six-space set.

Output functions have been implemented for each data type (except
EnumSet) to facilitate easy output for debugging purposes.  For
example:
\begin{quote}
\begin{verbatim}
ostream& GeObTypeOut(ostream& c, GeObType t)
\end{verbatim}
\end{quote}

\end{document}


